package com.sunrise.visual.frame.common
{
	public class linear
	{
		public var config:Object;
		public var data:String;
		public function linear(data:String,config:Object)
		{
			this.data = data;
			this.config = config;
			
		}
		public  function parseXML():XML {
			
			var xml:XML =this.getXML();
			return xml;
		}
		private function getXML():XML{
		
			var linearXml:XML = <anychart>
			
				<margin all="0"/>
				<settings>
				<animation enabled="True" />
				</settings>
			  <gauges>
				<gauge>
				  <chart_settings>
						<chart_background enabled="false">
					      <inside_margin left="0" top="0" right="0" bottom="0"/>
						</chart_background>
						<data_plot_background enabled="false" />
						<title enabled="false">
						</title>
				  </chart_settings>
				  <linear orientation="Vertical" x="0" y="0" >
					<axis end_margin="10" >
					  <scale minimum="0" maximum={this.config.maxnum||"50"} major_interval={this.config.major_interval||"10"}/>
					  <scale_bar enabled="true">
						<fill enabled="true" type="Gradient">
						  <gradient angle="0">
							<key color="Rgb(220,220,220)"/>
							<key color="Rgb(245,245,245)"/>
							<key color="Rgb(220,220,220)"/>
						  </gradient>
						</fill>
						<border enabled="true" color="Rgb(190,190,190)"/>
						<effects enabled="true">
						  <drop_shadow enabled="true" color="white" distance="1" blur_x="2" blur_y="2" opacity="0.3"/>
						</effects>
					  </scale_bar>
					  <scale_line enabled="false"/>
					  <major_tickmark enabled="true" shape="Line" align="Inside" length="3" >
						<border enabled="true" color="white"/>
					  </major_tickmark>
					  <minor_tickmark enabled="true" shape="Line" align="Inside" length="1.5">
						<border enabled="true" color="white"/>
					  </minor_tickmark>
					  <labels enabled="true" align="Inside" padding="5">
					  
						<format>{"{%Value}{numDecimals:0}"}</format>
						
<font family="Microsoft Yahei"  size="12" bold="fasle" color="white"/>
					  </labels>
					</axis>
					
						
					<frame enabled="false" type="Rectangular">
					  <corners type="Rounded" all="5"/>
					  <outer_stroke enabled="true" thickness="3">
						<fill type="Gradient">
						  <gradient>
							<key color="#FEFEFE"/>
							<key color="#CECECE"/>
						  </gradient>
						</fill>
						<border enabled="true" color="Black" opacity="0.1"/>
					  </outer_stroke>
					  <inner_stroke enabled="false"/>
					  <background>
						<fill type="Solid" color="White">
						  <gradient>
							<key position="0" color="#FFFFFF"/>
							<key position="0.3" color="#EEEEEE"/>
							<key position="1" color="#FEFEFE"/>
						  </gradient>
						</fill>
						<border enabled="false" type="Gradient" thickness="6"/>
						<effects enabled="true">
						  <inner_shadow enabled="true" distance="3" opacity="0.2"/>
						</effects>
					  </background>
					  <effects enabled="true">
						<drop_shadow enabled="true" distance="1" opacity="0.3"/>
					  </effects>
					</frame>
					<pointers>
					  <label enabled="false"/>
					  <pointer type="Thermometer" value={this.data||"0"} color="#F0673B"/>
					  <animation enabled="true" start_time="0" duration="0.7" interpolation_type="Back"/>
						<tooltip enabled="true"> 
					   <format><![CDATA[{%Value}{numDecimals:0}]]></format>
<font family="Microsoft Yahei" bold="false" size="12" />
						</tooltip>
					</pointers>
					
				  </linear>
				</gauge>
			  </gauges>
			</anychart>;
			
			return linearXml
		}
		
		
	}
}